<?php
declare(strict_types=1);//开启严格模式
//自定义函数的定义及调用
echo "3 + 4 = ", sum(3,4), "\n"; //函数的调用
function sum(int|float|string $x, int|float|string $y): int|float{ //定义函数
    return $x+$y;
}
//函数参数、返回值类型及严格模式
echo "3.6 + 4.8 = ", sum(3.4,4.8), "\n";
echo "3.6 + 4.8 = ", sum('3.4','4.8'), "\n";